package cn.lyh.controller;


import cn.lyh.domain.Order;
import cn.lyh.entities.CommonResult;
import cn.lyh.service.IOrderService;
import cn.lyh.service.impl.OrderServiceImpl;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liangYiHui
 * @since 2021-07-19
 */
@RestController
@RequestMapping("/order")
public class OrderController {
    @Resource
    private OrderServiceImpl orderService;

    public CommonResult create(Order order){
        orderService.create(order);
        return new CommonResult(200,"订单创建成功");
    }
}

